package com.hoas.quickstart.threads.chapter02.chapter02_3_4;

public class Run {

    public static void main(String[] args) {

        System.out.println("使用 synchronized 关键字增加 volatile 的原子性");

        MyThread[] myThreadArray = new MyThread[100];
        for (int i = 0; i < 100; i++) {
            myThreadArray[i] = new MyThread();
        }
        for (int i = 0; i < 100; i++) {
            myThreadArray[i].start();
        }

    }

}
